package com.guigu.youxuan.service;

import com.baomidou.mybatisplus.extension.service.IService;

import com.guigu.youxuan.common.utils.PageUtils;
import com.github.pagehelper.PageInfo;
import com.guigu.youxuan.pojo.SysUsers;
import com.guigu.youxuan.pojo.dto.LoginForm;
import com.guigu.youxuan.pojo.dto.RegisterForm;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author liweixin
 * @since 2024-05-15
 */
public interface ISysUsersService extends IService<SysUsers> {
    /**
     * 登录
     * @return
     */
    SysUsers getSysUsers(LoginForm loginForm);

    /**
     * 查询用户名是否重复
     * @param username
     * @return
     */
    String selUserCount(String username);

    /**
     * 前台的注册用户
     * @param sysUsers
     */
    void addSysUsers(SysUsers sysUsers);

    /**
     *查询方法
     * @param pageNo
     * @param pageSize
     * @param sysUsers
     * @return
     */
    PageUtils<SysUsers>  getSysUsersList(SysUsers sysUsers, int  pageNo, int pageSize);

    /**
     * 删除
     * @param sysUsers
     */
    void delSysUser(SysUsers sysUsers);

    /**
     * 批量删除
     * @param sysUsersList
     */
    void delsSysUser(List<SysUsers> sysUsersList);

    /**
     * 用户冻结/正常
     * @param sysUsers
     */
    void switchState(SysUsers sysUsers);
}
